//
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

div(ng-if="metrics.id")
  h1 Overview
  table.table
    thead
      tr
        th Data Port
        th All Slots
        th Free Slots
        th CPU Cores
        th Physical Memory
        th JVM Heap Size
        th Flink Managed Memory
    tbody
      tr
        td {{ metrics.dataPort }}
        td {{ metrics.slotsNumber }}
        td {{ metrics.freeSlots }}
        td {{ metrics.hardware.cpuCores }}
        td {{ metrics.hardware.physicalMemory | humanizeBytes }}
        td {{ metrics.hardware.freeMemory | humanizeBytes }}
        td {{ metrics.hardware.managedMemory | humanizeBytes }}

  h1 Memory

  h2 JVM (Heap/Non-Heap)
  table.table.table-properties
    thead
      tr
        th Type
        th Committed
        th Used
        th Maximum
    tbody
      tr
        td Heap
        td {{ metrics.metrics.heapCommitted | humanizeBytes }}
        td {{ metrics.metrics.heapUsed | humanizeBytes }}
        td {{ metrics.metrics.heapMax | humanizeBytes }}
      tr
        td Non-Heap
        td {{ metrics.metrics.nonHeapCommitted | humanizeBytes }}
        td {{ metrics.metrics.nonHeapUsed | humanizeBytes }}
        td {{ metrics.metrics.nonHeapMax | humanizeBytes }}
      tr
        td Total
        td {{ metrics.metrics.heapCommitted + metrics.metrics.nonHeapCommitted | humanizeBytes }}
        td {{ metrics.metrics.heapUsed + metrics.metrics.nonHeapUsed | humanizeBytes }}
        td {{ metrics.metrics.heapMax + metrics.metrics.nonHeapMax | humanizeBytes }}

  h2 Outside JVM
  table.table.table-properties
    thead
      tr
        th Type
        th Count
        th Used
        th Capacity
    tbody
      tr
        td Direct
        td {{ metrics.metrics.directCount | toLocaleString }}
        td {{ metrics.metrics.directUsed | humanizeBytes }}
        td {{ metrics.metrics.directMax | humanizeBytes }}
      tr
        td Mapped
        td {{ metrics.metrics.mappedCount | toLocaleString }}
        td {{ metrics.metrics.mappedUsed | humanizeBytes }}
        td {{ metrics.metrics.mappedMax | humanizeBytes }}

  h1 Network

  h2 Memory Segments
  table.table.table-properties
    thead
      tr
        th Type
        th Count
    tbody
      tr
        td Available
        td {{ metrics.metrics.memorySegmentsAvailable | toLocaleString }}
      tr
        td Total
        td {{ metrics.metrics.memorySegmentsTotal | toLocaleString }}

  h1 Garbage Collection
  table.table.table-properties
    thead
      tr
        th Collector
        th Count
        th Time
    tbody(ng-repeat="g in metrics.metrics.garbageCollectors")
      tr
        td {{ g.name }}
        td {{ g.count | toLocaleString }}
        td {{ g.time | toLocaleString }}
